#region MIT Licence
/*
 * Copyright (C) 2014 PdfCreative
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software 
 * and associated documentation files (the "Software"), to deal in the Software without restriction, 
 * including without limitation the rights to use, copy, modify, merge, publish, distribute, 
 * sublicense, and/or sell copies of the Software, and to permit persons to whom 
 * the Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included 
 * in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 
 * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE 
 * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 
 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */
#endregion

using System;
using System.Collections.Generic;
using System.Text;

namespace PdfCreative.Pdf.Writer.Fonts.TrueType
{
    /// <summary>
    /// The GlyphInfo class encapsulates information about a glyph in a TrueType font file. It is used internally by
    /// the TrueTypeFontInfo class.
    /// </summary>
    internal class GlyphInfo
    {
        // Private fields
        // ==============
        #region Private fields
        private int _xMin;
        private int _yMin;
        private int _xMax;
        private int _yMax;
        private HorizontalMetric _metric;
        #endregion



        // Public properties
        // =================
        #region Public properties
        /// <summary>
        /// Retrieves the minimum X coordinate.
        /// </summary>
        public int XMin
        {
            get { return _xMin; }
            set { _xMin = value; }
        }

        /// <summary>
        /// Retrieves the minimum Y coordinate.
        /// </summary>
        public int YMin
        {
            get { return _yMin; }
            set { _yMin = value; }
        }

        /// <summary>
        /// Retrieves the maximum X coordinate.
        /// </summary>
        public int XMax
        {
            get { return _xMax; }
            set { _xMax = value; }
        }

        /// <summary>
        /// Retrieves the maximum Y coordinate.
        /// </summary>
        public int YMax
        {
            get { return _yMax; }
            set { _yMax = value; }
        }

        public HorizontalMetric Metric
        {
            get { return _metric; }
            set { _metric = value; }
        }

        #endregion



        // Object overrides
        // ================
        #region Object overrides
        /// <summary>
        /// Returns the string representation of the GlyphInfo structure.
        /// </summary>
        /// <returns>The string representation</returns>
        public override string ToString()
        {
            return String.Format("{{ {0}, {1}, {2}, {3} }}", _xMin, _yMin, _xMax, _yMax);
        }
        #endregion

    } // GlyphInfo class
}
